<template lang="pug">
  el-switch(
    v-model="currentValue"
    :active-color="activeColor"
    :inactive-color="inactiveColor"
    :disabled="disabled")
</template>

<script>

export default {
  props: {
    disabled: {
      type: Boolean,
      default: false
    },
    value: {
      type: Boolean,
      default: true
    },
    options: {
      type: Array,
      default: () => []
    },
    activeColor: {
      type: String,
      default: '#13ce66'
    },
    inactiveColor: {
      type: String,
      default: '#ddd'
    }
  },
  computed: {
    currentValue: {
      get () {
        return Boolean(this.value)
      },
      set (val) {
        this.$emit('input', Boolean(val))
      }
    }
  }
}
</script>
